/*
 * Copyright (C) 2013 by Osama Abdelkhaleq, Andrew Foxworth, Jasmine Griffiths, Kyle Kenik
 * -----------------------------------------------------------------------------------------
 * 
 * This file is part of
 * 
 * MovSimDroid.
 * 
 * MovSimDroid is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * MovSimDroid is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with MovSim. If not, see <http://www.gnu.org/licenses/>
 * or <http://www.movsim.org>.
 * 
 * -----------------------------------------------------------------------------------------
 */
package org.movsim.movdroid;

import android.provider.BaseColumns;
 /*
  * Description: Interface-like class to clean up the database class
  * 
  * Known Bugs: None!
  */
public final class DatabaseContract {

	public static final String DATABASE_NAME = "scoresManager";
	public static final int DATABASE_VERSION = 3;
	private static final String COMMA = ",";

	public DatabaseContract() {
	}

	/* Inner class that defines the table contents */
	public static abstract class submit_table implements BaseColumns {

		public static final String TABLE_SUBMIT = "submit";	
		public static final String KEY_ID 	= "id";
		public static final String KEY_LEVEL = "level";
		public static final String KEY_SCORE = "score";
		public static final String RED = "red";
		public static final String YELLOW = "yellow";
		public static final String GREEN = "green";
		public static final String USER_INITIALS="initials";
		
		public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_SUBMIT + "("
				+ KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT"+ COMMA + KEY_LEVEL
				+ " INTEGER"+ COMMA + KEY_SCORE + " DOUBLE" + COMMA + RED 
				+ " INTEGER"+ COMMA + YELLOW + " INTEGER" + COMMA 
				+ GREEN + " INTEGER" + COMMA + USER_INITIALS + " TEXT)";
		
		public static final String DELETE_SUBMIT_TABLE = "DROP TABLE IF EXISTS " + TABLE_SUBMIT;
	}
	public static abstract class high_table implements BaseColumns {
	
		public static final String TABLE_HIGH = "high";
		public static final String KEY_ID 	= "id";
		public static final String KEY_LEVEL = "level";
		public static final String KEY_SCORE = "score";
		public static final String RED = "red";
		public static final String YELLOW = "yellow";
		public static final String GREEN = "green";
		public static final String USER_INITIALS="initials";
		
		public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_HIGH + "(" + KEY_ID
				+ " INTEGER PRIMARY KEY AUTOINCREMENT"+ COMMA + KEY_LEVEL
				+ " INTEGER" + COMMA + KEY_SCORE + " DOUBLE"+ COMMA + RED
				+ " INTEGER" + COMMA + YELLOW + " INTEGER"+ COMMA + GREEN 
				+ " INTEGER" + COMMA + USER_INITIALS + " TEXT)";
		
		public static final String DELETE_HIGH_TABLE = "DROP TABLE IF EXISTS " + TABLE_HIGH;
	}
}
